
<!DOCTYPE html>
<html lang="zh-CN" class="loading">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>分类: leetcode百题计划 - peony&#39;s blogs</title>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="google" content="notranslate" />
    <meta name="keywords" content="peony,"> 
    
    <meta name="author" content="peony"> 
    <link rel="alternative" href="atom.xml" title="peony&#39;s blogs" type="application/atom+xml"> 
    <link rel="icon" href="/img/favicon63.png"> 
    
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">

    
<link rel="stylesheet" href="/css/diaspora.css">

    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <script>
         (adsbygoogle = window.adsbygoogle || []).push({
              google_ad_client: "ca-pub-8691406134231910",
              enable_page_level_ads: true
         });
    </script>
    <script async custom-element="amp-auto-ads"
        src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js">
    </script>
<meta name="generator" content="Hexo 4.2.0"></head>

<body class="loading">
    <span id="config-title" style="display:none">peony&#39;s blogs</span>
    <div id="loader"></div>
    <div class="nav">
    <ul id="menu-menu" class="menu">
        
        <li class="pview menu-item menu-item-type-post_type menu-item-object-page">
            <a href="/whoami/" title="Whoami" target="_blank" rel="noopener">Whoami</a>
        </li>
        
        <li class="  menu-item menu-item-type-post_type menu-item-object-page">
            <a href="https://github.com/PPeony" title="Github(目前没有任何项目，除了这篇博客)" target="_blank" rel="noopener">Github(目前没有任何项目，除了这篇博客)</a>
        </li>
        
        <li class="  menu-item menu-item-type-post_type menu-item-object-page">
            <a href="https://leetcode-cn.com/u/peony-2/" title="leetcode" target="_blank" rel="noopener">leetcode</a>
        </li>
        
        <li class="  menu-item menu-item-type-post_type menu-item-object-page">
            <a href="https://blog.csdn.net/qq_15764477" title="CSDN" target="_blank" rel="noopener">CSDN</a>
        </li>
        
        <li class="pview menu-item menu-item-type-post_type menu-item-object-page">
            <a href="/categories/" title="分类" target="_blank" rel="noopener">分类</a>
        </li>
        
    </ul>
    <p id="copyright">
        &copy; 2020 peony.
        Powered by <a href="http://hexo.io/" title="Hexo" target="_blank" rel="noopener">Hexo</a>
        Theme <a href="https://github.com/Fechin/hexo-theme-diaspora" title="Diaspora" target="_blank" rel="noopener">Diaspora</a>
        by Fechin
    </p>
</div>

<div id="container">
    
<div id="screen">
    <div id="mark">
        <div class="layer" data-depth="0.4">
            <img src="/img/welcome-cover2.jpg" id="cover" crossorigin="anonymous" width="1920" height="1080">
        </div>
    </div>
    <div id="vibrant">
        <svg viewBox="0 0 2880 1620" height="100%" preserveAspectRatio="xMaxYMax slice">
            <polygon opacity="0.7" points="2000,1620 0,1620 0,0 600,0 "/>
        </svg>
        <div></div>
    </div>
    <div id="header">
        <div>
            <a class="image-logo" href="/"></a>
            <div class="icon-menu switchmenu"></div>
        </div>
    </div>
    
    <div id="post0">
        <p>三月 14, 2020</p>
        <h2><a href="/2020/03/14/leetcode988-%E4%BB%8E%E5%8F%B6%E7%BB%93%E7%82%B9%E5%BC%80%E5%A7%8B%E7%9A%84%E6%9C%80%E5%B0%8F%E5%AD%97%E7%AC%A6%E4%B8%B2/" title="leetcode988. 从叶结点开始的最小字符串" class="posttitle">leetcode988. 从叶结点开始的最小字符串</a></h2>
        <p class="summary">leetcode988. 从叶结点开始的最小字符串
 我被dfs整懵了。我先说我的错误思路：我想用后序遍历找出左子...</p>
    </div>
    
</div>

    <div id="primary">
        
<div class="post">
    <a href="/2020/03/14/leetcode988-%E4%BB%8E%E5%8F%B6%E7%BB%93%E7%82%B9%E5%BC%80%E5%A7%8B%E7%9A%84%E6%9C%80%E5%B0%8F%E5%AD%97%E7%AC%A6%E4%B8%B2/" title="leetcode988. 从叶结点开始的最小字符串">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>三月 14, 2020</p>
        <h3><a href="/2020/03/14/leetcode988-%E4%BB%8E%E5%8F%B6%E7%BB%93%E7%82%B9%E5%BC%80%E5%A7%8B%E7%9A%84%E6%9C%80%E5%B0%8F%E5%AD%97%E7%AC%A6%E4%B8%B2/" title="leetcode988. 从叶结点开始的最小字符串" class="posttitle">leetcode988. 从叶结点开始的最小字符串</a></h3>
        <p>leetcode988. 从叶结点开始的最小字符串
 我被dfs整懵了。我先说我的错误思路：我想用后序遍历找出左子树和右子树较小的那个。但是     &n...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/03/14/leetcode111-%E4%BA%8C%E5%8F%89%E6%A0%91%E7%9A%84%E6%9C%80%E5%B0%8F%E6%B7%B1%E5%BA%A6/" title="leetcode111.二叉树的最小深度">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>三月 14, 2020</p>
        <h3><a href="/2020/03/14/leetcode111-%E4%BA%8C%E5%8F%89%E6%A0%91%E7%9A%84%E6%9C%80%E5%B0%8F%E6%B7%B1%E5%BA%A6/" title="leetcode111.二叉树的最小深度" class="posttitle">leetcode111.二叉树的最小深度</a></h3>
        <p>leetcode111.二叉树的最小深度

给定一个二叉树，找出其最小深度。最小深度是从根节点到最近叶子节点的最短路径上的节点数量。说明: 叶子节点是指没...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/03/14/leetcode662-%E4%BA%8C%E5%8F%89%E6%A0%91%E6%9C%80%E5%A4%A7%E5%AE%BD%E5%BA%A6/" title="leetcode662. 二叉树最大宽度">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>三月 14, 2020</p>
        <h3><a href="/2020/03/14/leetcode662-%E4%BA%8C%E5%8F%89%E6%A0%91%E6%9C%80%E5%A4%A7%E5%AE%BD%E5%BA%A6/" title="leetcode662. 二叉树最大宽度" class="posttitle">leetcode662. 二叉树最大宽度</a></h3>
        <p>leetcode662. 二叉树最大宽度

给定一个二叉树，编写一个函数来获取这个树的最大宽度。树的宽度是所有层中的最大宽度。这个二叉树与满二叉树（ful...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/03/14/leetcode987-%E4%BA%8C%E5%8F%89%E6%A0%91%E7%9A%84%E5%9E%82%E5%BA%8F%E9%81%8D%E5%8E%86/" title="leetcode987. 二叉树的垂序遍历">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>三月 14, 2020</p>
        <h3><a href="/2020/03/14/leetcode987-%E4%BA%8C%E5%8F%89%E6%A0%91%E7%9A%84%E5%9E%82%E5%BA%8F%E9%81%8D%E5%8E%86/" title="leetcode987. 二叉树的垂序遍历" class="posttitle">leetcode987. 二叉树的垂序遍历</a></h3>
        <p>leetcode987. 二叉树的垂序遍历

给定二叉树，按垂序遍历返回其结点值。对位于 (X, Y) 的每个结点而言，其左右子结点分别位于 (X-1, ...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/02/23/leetcode114-%E4%BA%8C%E5%8F%89%E6%A0%91%E5%B1%95%E5%BC%80%E4%B8%BA%E9%93%BE%E8%A1%A8/" title="leetcode114.二叉树展开为链表">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>二月 23, 2020</p>
        <h3><a href="/2020/02/23/leetcode114-%E4%BA%8C%E5%8F%89%E6%A0%91%E5%B1%95%E5%BC%80%E4%B8%BA%E9%93%BE%E8%A1%A8/" title="leetcode114.二叉树展开为链表" class="posttitle">leetcode114.二叉树展开为链表</a></h3>
        <p>leetcode114. 二叉树展开为链表

给定一个二叉树，原地将它展开为链表。

例如，给定二叉树

  1
 / \
 2   5
/ \   \
...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/02/23/leetcode222-%E5%AE%8C%E5%85%A8%E4%BA%8C%E5%8F%89%E6%A0%91%E8%8A%82%E7%82%B9%E7%9A%84%E4%B8%AA%E6%95%B0/" title="leetcode222.完全二叉树节点的个数">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>二月 23, 2020</p>
        <h3><a href="/2020/02/23/leetcode222-%E5%AE%8C%E5%85%A8%E4%BA%8C%E5%8F%89%E6%A0%91%E8%8A%82%E7%82%B9%E7%9A%84%E4%B8%AA%E6%95%B0/" title="leetcode222.完全二叉树节点的个数" class="posttitle">leetcode222.完全二叉树节点的个数</a></h3>
        <p>leetcode222. 完全二叉树的节点个数

给出一个完全二叉树，求出该树的节点个数。


说明：完全二叉树的定义如下：在完全二叉树中，除了最底层节点...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/02/23/leetcode113-%E8%B7%AF%E5%BE%84%E6%80%BB%E5%92%8CII/" title="leetcode113.路径总和II">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>二月 23, 2020</p>
        <h3><a href="/2020/02/23/leetcode113-%E8%B7%AF%E5%BE%84%E6%80%BB%E5%92%8CII/" title="leetcode113.路径总和II" class="posttitle">leetcode113.路径总和II</a></h3>
        <p>leetcode113. 路径总和 II

给定一个二叉树和一个目标和，找到所有从根节点到叶子节点路径总和等于给定目标和的路径。说明: 叶子节点是指没有子...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/02/23/leetcode112-%E8%B7%AF%E5%BE%84%E6%80%BB%E5%92%8C/" title="leetcode112.路径总和">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>二月 23, 2020</p>
        <h3><a href="/2020/02/23/leetcode112-%E8%B7%AF%E5%BE%84%E6%80%BB%E5%92%8C/" title="leetcode112.路径总和" class="posttitle">leetcode112.路径总和</a></h3>
        <p>leetcode112.路径总和

给定一个二叉树和一个目标和，判断该树中是否存在根节点到叶子节点的路径，这条路径上所有节点值相加等于目标和。


说明:...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/02/23/leetcode103-%E4%BA%8C%E5%8F%89%E6%A0%91%E7%9A%84%E9%94%AF%E9%BD%BF%E5%BD%A2%E5%B1%82%E6%AC%A1%E9%81%8D%E5%8E%86/" title="leetcode103.二叉树的锯齿形层次遍历">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>二月 23, 2020</p>
        <h3><a href="/2020/02/23/leetcode103-%E4%BA%8C%E5%8F%89%E6%A0%91%E7%9A%84%E9%94%AF%E9%BD%BF%E5%BD%A2%E5%B1%82%E6%AC%A1%E9%81%8D%E5%8E%86/" title="leetcode103.二叉树的锯齿形层次遍历" class="posttitle">leetcode103.二叉树的锯齿形层次遍历</a></h3>
        <p>leetcode103. 二叉树的锯齿形层次遍历

给定一个二叉树，返回其节点值的锯齿形层次遍历。（即先从左往右，再从右往左进行下一层遍历，以此类推，层与...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/02/23/leetcode102-%E4%BA%8C%E5%8F%89%E6%A0%91%E7%9A%84%E5%B1%82%E6%AC%A1%E9%81%8D%E5%8E%86/" title="leetcode102.二叉树的层次遍历">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>二月 23, 2020</p>
        <h3><a href="/2020/02/23/leetcode102-%E4%BA%8C%E5%8F%89%E6%A0%91%E7%9A%84%E5%B1%82%E6%AC%A1%E9%81%8D%E5%8E%86/" title="leetcode102.二叉树的层次遍历" class="posttitle">leetcode102.二叉树的层次遍历</a></h3>
        <p>leetcode 102. 二叉树的层次遍历

给定一个二叉树，返回其按层次遍历的节点值。 （即逐层地，从左到右访问所有节点）。


例如:给定二叉树: ...</p>
    </div>
</div>


    </div>
    
    <div id="pager"><a href="/categories/leetcode%E7%99%BE%E9%A2%98%E8%AE%A1%E5%88%92/diaspora/6/" class="more">加载更多</a></div>
    
</div>
<div id="preview"></div>


</body>

<script src="//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>


<script src="//lib.baomitu.com/jquery/1.8.3/jquery.min.js"></script>
<script src="/js/plugin.js"></script>
<script src="/js/diaspora.js"></script>


<link rel="stylesheet" href="/photoswipe/photoswipe.css">
<link rel="stylesheet" href="/photoswipe/default-skin/default-skin.css">


<script src="/photoswipe/photoswipe.min.js"></script>
<script src="/photoswipe/photoswipe-ui-default.min.js"></script>


<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>
    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">
        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>
        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">
            <div class="pswp__top-bar">
                <!--  Controls are self-explanatory. Order can be changed. -->
                <div class="pswp__counter"></div>
                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
                <button class="pswp__button pswp__button--share" title="Share"></button>
                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                      <div class="pswp__preloader__cut">
                        <div class="pswp__preloader__donut"></div>
                      </div>
                    </div>
                </div>
            </div>
            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div> 
            </div>
            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>
            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>
            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>
        </div>
    </div>
</div>




</html>
